<?php
require('../database/db.php');
$mysql=new mysql();
// 分页
if($_REQUEST['page']!="" && $_REQUEST['pagesize']!=""){
	$de=$_REQUEST['page']*$_REQUEST['pagesize'];
	$size=$_REQUEST['pagesize'];
}else{
	$de=0;
	$size=10;
}
// 分页 end
$cityid=$_REQUEST['cityid'];
if ($cityid!='') {
	$sql="select * from shop where city='".$cityid."' and `recommend`=1 and `open`=1 and `check`=1 limit $de,$size";
	$recommend_shop = $mysql->getAll($sql);

	$arr = array('code' => 100, 'tip' =>'查询成功' ,'recommend_shop' =>$recommend_shop);
}else{
	$arr = array('code' => 200, 'tip' =>'参数传入有误');
}
echo json_encode($arr);
?>